import type { ILogin, IToken } from "@/types/login";
import type { IUserInfo } from "@/types/user";
import httpReq from "@/utils/request";

// 注册接口
export const regApi = (data: ILogin) => {
    return httpReq('/api/reguser', 'POST', data)
}
// 登录接口
export const loginApi = (data: ILogin) => {
    return httpReq<IToken>('/api/login', 'POST', data)
}
// 获取个人信息
export const getUserInfoApi = () => {
    return httpReq<IUserInfo>('/my/userinfo')
}